<?php
	session_start();
	include ("../includes/conn.php");

	import_request_variables("gp","v_");
	$csn=$v_csn;
	$keywords=$v_keywords;

	if (!isset($_SESSION['id'])){
		$_SESSION['id'] = md5(rand());
	}

	//add product to shopping cart
	if (isset($addsign) && $addsign == '1'){
		require_once("../includes/cart.php");
	}

	//update shopping cart when amount and/or promo code change
	if (isset($button) && $button == 'Update'){
		if ($qtychg <> ''){
			require_once("../includes/cart-upd.php");
		}
	}

	// delete selected product in shopping cart
	if (isset($button2) && $button2 == 'Remove'){
		require_once ('../includes/cart-delete.php');
	}

	//empty all products in shopping cart
	if (isset($button5) && $button5 == 'Clear All' ){
		require_once ('../includes/cart-empty.php');
	}
	
	//check out shopping cart for payment
	if (isset($button3) && $button3 == 'Check Out' ){
		echo "<script language=javascript>location.href='/cart-checkout.php';</script>";
		exit;
	}	

	if (!isset($cart)){
		$cart = 0;
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php include ("../includes/title.php");?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="<?php echo $subcatname;?>, loading, control, antibodies" />
<meta name="description" content="ABM's variety of <?php echo $subcatname;?> control antibodies, allows them to be used for a range of Western blot applications." />
<link rel="shortcut icon" href="/images/logo.ico" type="image/x-icon">
<link href="/style/abmnew.css" rel="stylesheet" type="text/css" />
<link href="/style/mirna.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#submenu {
	background:url(/LoadingControl/images/banner-stemcellantibody.jpg) right top;
	background-repeat:no-repeat;
}
</style>
</head>
<body>
<?php include ("../includes/header.php");?>
<div id="content">
  <?php include ("../includes/logosearch.php");?>
  <div id='container'>
    <div id='leftmenu'>
    	<?php include ("../includes/leftMenu.php");?>
    </div>
    <div id='rightcontent'>
      <div id='submenu'>
        <div id='subtitle'><?php echo"$catname"; ?></div>
      </div>
	  <div id='title'><?php echo"$subcatname"; ?></div>
      <div id='backbutton'> <?php echo "<span><a href='/Loading-Control-Antibodies.html' title='Loading Controls, Loading Control Western Blot, Loading Control Western Blot'>$catname</a></span> <a href='/Loading-Control-Antibodies.html'>";?><img src="/StemCell/images/arrow.png" width="5" height="10" border="0" /> Back</a></div>
      <div id='prod-detail'>
        <div id='order'> &nbsp; To order products, check the corresponding boxes on the right and then click 'Add to Cart'.
          <form id="form2" name="form2" method="post" action="">
          <div id='exp-list'>
            <?php 
				  echo"<table id='exp-table' width='100%' border='0' cellspacing='0' cellpadding='0' >
												<tr align='center'>
													<th align='left' width='180px'>Product</th>
													<th width='50px'>Raised In</th>
													<th width='65px'>Size</th>
													<th width='65px'>Cat. No.</th>
													<th width='50px'>Concentration</th>
													<th align='right' width='50px'>Price</th>
													<th width='60px'><img src='/img/icons/shopping_cart.png' width='17' height='17' /></th>
												</tr>";
							switch ($ssn){
								case 3948: $ssn2=197; break;
								case 3949: $ssn2=198; break;
								case 3950: $ssn2=199; break;
							}
								$prod = "select * from products where csn = 8 and ssn = $ssn2 and (catNo like 'g%' or catNo like 'y058203')";
								$prod_res = mysql_query($prod,$db);
								$prod_rows = mysql_num_rows ($prod_res);
									if ($prod_rows > 0){
										while($prod_r = mysql_fetch_array($prod_res)){
											$prodname = $prod_r['pname'];
											$htmlname = str_replace(" / "," ",$prodname);
											$htmlname = str_replace(" )",")",$htmlname);
											$htmlname = str_replace(" ","-",$htmlname);
											//$htmlname = str_replace("(","",$htmlname);
											$htmlname = str_replace("<SUB>","",$htmlname);
											$htmlname = str_replace("</SUB>","",$htmlname);
											$htmlname = str_replace("<SUP>","",$htmlname);
											$htmlname = str_replace("</SUP>","",$htmlname);
											$htmlname = str_replace("Anti-","",$htmlname);
											$htmlname = str_replace("Monoclonal","Antibody",$htmlname);
											$newname = str_replace("-"," ",$htmlname);
											
											$catno = $prod_r['catNo'];
											$dsn = $prod_r['dsn'];
											$price = ROUND($prod_r['price'],0);
											$quant = $prod_r['quantity'];
											$species = $prod_r['RaisedIn'];
											$concen = $prod_r['Concentration'];
											echo"<tr>";
													switch ($ssn){
														case 3948: echo"<td><a href='/$htmlname-Western-Blot-$catno.html' title='$newname Loading Control, Loading Control Antibody'>$prodname Antibody</a></td>";
														break;
														case 3949: echo"<td><a href='/$htmlname-Western-Blot-$catno.html' title='$newname, Actin Loading Control, Actin Filaments'>$prodname Antibody</a></td>";
														break;
														case 3950: echo"<td><a href='/$htmlname-Western-Blot-$catno.html' title='$newname Western Blot, Tubulin Loading Control'>$prodname Antibody</a></td>"; 
														break;
													}
													
													echo"
													<td align='center'>$species</td>
													<td align='center'>$quant</td>
													<td align='center'>$catno</td>
													<td align='center'>$concen</td>
													<td align='right' class='price'>$$price.00</td>
													<td align='center'><input type='checkbox' name='grp[]' value='$catno' /></td>
												 </tr>";
										}
									}
					echo "</table>";
		  		?>
           </div>
           <div id = 'exp-add'>
              <input name='car' type='hidden' id='car' value='1'/>
              <input type="hidden" name="addsign" id="addsign" value='1' />
              <input name='csn' type='hidden' id='csn' value='<?php echo $csn;?>'/>
              <input name='ssn' type='hidden' id='ssn' value='<?php echo $ssn;?>'/>
              <input name='dsn' type='hidden' id='dsn' value='<?php echo 0;?>'/>
              <input id="expcart" name="expcart" type="submit" title='Add Antibody to Cart' value="Add to Cart" />
            </div>
          </form>
        </div>
        <div id='cart'><a href='?cart=<?php echo ($cart+1)%2;?>&amp;csn=<?php echo $csn;?>&amp;ssn=<?php echo $ssn;?>' title='Display/Hide Cart'><img id="carttab" src="/images/cart.png" border="0" /></a></div>
        <?php include('../includes/shoppingCart.php');?> 
      </div>
    </div>
  </div>
</div>
<?php include('../includes/footer.php');?>

<!-- Piwik --> 
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://www.abmgood.com/piwik/" : "http://www.abmgood.com/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script>
<noscript>
<p><img src="http://www.abmgood.com/piwik/piwik.php?idsite=1" style="border:0" alt="" /></p>
</noscript>
<!-- End Piwik Tag -->
</body>
</html>
